package com.micro.school.order.entity;

import com.micro.school.order.vo.PayStudentFeePaymentDetailExcelVo;
import com.micro.school.order.vo.PayStudentFeePaymentExcelVo;
import com.micro.school.order.vo.PayStudentFeePaymentPreVo;

/**
 * 支付类型名字转换
 */
public class GraduateStatusEntity
{
    public static void setGraduate(PayStudentFeePaymentDetailExcelVo excelVo){
        excelVo.setGraduate(getGraduateFromNum(excelVo.getGraduate()));
    }
    public static void setGraduate(PayStudentFeePaymentPreVo excelVo){
        excelVo.setGraduate(getGraduateFromNum(excelVo.getGraduate()));
    }

    public static void setGraduate(PayStudentFeePaymentExcelVo excelVo){
        excelVo.setGraduate(getGraduateFromNum(excelVo.getGraduate()));
    }
    private   static  String getGraduateFromNum(String graduate){
        if(null==graduate){
            return "";
        }
        //学生状态0未入学1在校2休学3请假4退学5毕业
        if(graduate.equals("0")){
            graduate = "未入学";
        }
        else if(graduate.equals("1")){
            graduate = "在校";
        }else if(graduate.equals("2")){
            graduate = "休学";
        }else if(graduate.equals("3")){
            graduate = "请假";
        }else if(graduate.equals("4")){
            graduate = "退学";
        }else if(graduate.equals("5")){
            graduate = "毕业";
        }else {
            graduate = "新生";
        }
        return graduate;
    }
}
